import React from 'react';

import { Route, Switch, Redirect } from 'react-router-dom';

import AddOrUpdate from './AddOrUpdate';
import Detail from './Detail';
import Home from './Home';

/**
 * 商品管理
*/
export default function Product() {
    return (
        <Switch>
            <Route path="/product" exact component={Home} />
            <Route path="/product/detail" component={Detail} />
            <Route path="/product/update" component={AddOrUpdate} />
            <Route path="/product/add" component={AddOrUpdate} />
            <Redirect to="/product" />
        </Switch>
    )
}
